/***
 * @description axios封装
 * @file api.ts
 * @author andy
 * @date 2024/3/22 16:40
 */
// file:api.s
// 1、导入axios以及拦截器
import service from "./request";

// demo接口1
export const demo1 = (data: any) => {
  return service({
    url: "/user/user/demo1/" + data,
    method: "post",
  });
};

// demo接口2
export const demo2 = (data: any) => {
  return service({
    url: "/user/user/demo2",
    method: "post",
    data,
  });
};
// 品牌列表
export const brandList = (data: any) => {
  return service({
    url: "/brand/brand/brandList",
    method: "post",
    data,
  });
};
// 添加品牌
export const addBrand = (data: any) => {
  return service({
    url: "/brand/brand/addBrand",
    method: "post",
    data,
  });
};
// 修改品牌状态
export const updateStatus = (data: any) => {
  return service({
    url: "/brand/brand/updateStatus",
    method: "post",
    data,
  });
};
// 批量删除
export const deleteBatchBrand = (data: any) => {
  return service({
    url: "/brand/brand/deleteBatchBrand",
    method: "post",
    data,
  });
};

//分类树形
export const getTypeTree = (data: any) => {
  return service({
    url: "/brand/brand/getTypeTree",
    method: "post",
    data,
  });
};
//添加分类
export const addType = (data: any) => {
  return service({
    url: "/brand/brand/addType",
    method: "post",
    data,
  });
};
// 分类下拉框
export const getSelectType = () => {
  return service({
    url: "/brand/brand/getSelectType",
    method: "post",
  });
};
